package com.jichangxiu.server.platform.entity.map;

import com.jichangxiu.server.platform.entity.dto.PlatformRoleQueryDto;
import com.jichangxiu.server.platform.entity.po.PlatformRole;
import com.jichangxiu.server.platform.entity.vo.PlatformRoleAddVo;
import com.jichangxiu.server.platform.entity.vo.PlatformRoleEditVo;
import com.jichangxiu.server.platform.entity.vo.PlatformRoleQueryVo;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * PlatformRoleBasic:
 *
 * @author Jcx
 * @create 2023-03-21 19:50
 */
@Mapper(builder = @Builder(disableBuilder = true))
public interface PlatformRoleBasic {

    public PlatformRoleBasic INSTANCE = Mappers.getMapper(PlatformRoleBasic.class);

    /**
     * 转换 PlatformRole
     *
     * @param platformRoleAddVo 视图对象
     * @return 数据库对象
     */
    public PlatformRole toPlatformRole(PlatformRoleAddVo platformRoleAddVo);

    /**
     * 转换 PlatformRole
     *
     * @param platformRoleEditVo 视图对象
     * @return 数据库对象
     */
    public PlatformRole toPlatformRole(PlatformRoleEditVo platformRoleEditVo);

    /**
     * 转换 PlatformRole
     *
     * @param platformRoleQueryVo 视图对象
     * @return 数据库对象
     */
    public PlatformRole toPlatformRole(PlatformRoleQueryVo platformRoleQueryVo);

    /**
     * 转换 PlatformRoleQueryDto
     *
     * @param platformRole 数据库对象
     * @return 数据传输对象
     */
    public PlatformRoleQueryDto toPlatformRoleQueryDto(PlatformRole platformRole);

    /**
     * 转换 PlatformRoleQueryDto
     *
     * @param platformRoleList 数据库对象列表
     * @return 数据传输对象列表
     */
    public List<PlatformRoleQueryDto> toPlatformRoleQueryDtoList(List<PlatformRole> platformRoleList);

    /**
     * 转换 PlatformRole
     *
     * @param platformRoleQueryDtoList 数据传输对象列表
     * @return 数据库对象列表
     */
    public List<PlatformRole> toPlatformRoleList(List<PlatformRoleQueryDto> platformRoleQueryDtoList);

}
